<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        // 类数组
// ---------------------------------------------------------------------------------------------------------------------------------------------------------------
        var obj = {
            "1" : 'a',
            "2" : 'b',
            "length" : 2,
            "push" : Array.prototype.push,    
        };
        obj.push('c');
        obj.push('d');
        //obj.push('c');  ----->  obj[2]= 'c' ,length ++
        // obj = {
        //     "1" : 'a',
        //     "2" : 'c',
        //     "length" : 3,
        //     "push" : Array.prototype.push,
        // }


        //obj.push('d'); ------>  obj[3] = 'd' ,length ++
        // obj = {
        //     "1" : 'a',
        //     "2" : 'c',
        //     "3" : 'd',
        //     "length" : 4,
        //     "push" : Array.prototype.push,
        // }

        

    </script>
</body>
</html>